package cn.com.dcsgo.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;

/**
 * MvcConfig
 * 将 handler(controller)、handlerMapping、handlerAdapter装配到IoC容器中
 *
 * @author Dcsgo
 * @since 2025/2/25 10:39
 */
@Configuration
@ComponentScan({"cn.com.dcsgo.controller"})
public class MvcConfig {

    @Bean
    public RequestMappingHandlerMapping handlerMapping() {
        return new RequestMappingHandlerMapping();
    }

    @Bean
    public RequestMappingHandlerAdapter handlerAdapter() {
        return new RequestMappingHandlerAdapter();
    }

}
